<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"/>
    <meta content="telephone=no,email=no" name="format-detection">
    <!--禁止自动识别电话号码和邮箱-->
    <meta content="yes" name="apple-mobile-web-app-capable">
    <!--苹果手机：会删除默认的工具栏和菜单栏，网站开启对web app程序的支持-->
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <!--苹果手机：在web app应用下状态条（屏幕顶部条）的颜色,默认值为default（白色），可以定为black（黑色）和black-translucent（灰色半透明）。-->
    <meta name="apple-touch-fullscreen" content="yes"/>
    <!--苹果手机：如果把一个web app添加到了主屏幕中，那么从主屏幕中打开这个web app则全屏显示-->
    <link rel="stylesheet" type="text/css" href="css/Administration.css">
    <script type="text/javascript" src="js/jquery-3.3.1.js"></script>
    <title></title>
</head>
<body>
<div id="vueData">
    <header class="dis_flex">
        <div class="title_header dis_flex">
            <div class="dis_flex">
                <img src="img/return_3.png" alt="">
            </div>
            <div>
                <span>管理页面</span>
            </div>
            <div></div>
        </div>
        <img src="img/rectangle_3.png">
        <span>闪多新零售</span>
    </header>
    <div class="body">
        <div v-if="user.jurisdiction==1||user.jurisdiction==3" class="category dis_flex " @click="gotoStoreHomeView">
            <div class="dis_flex">
                <img src="img/shop.png">
                <span>店铺管理</span>
            </div>
            <div class="dis_flex">
                <img src="img/return_5.png">
            </div>
        </div>
        <div v-if="user.jurisdiction==1||user.jurisdiction==3" class="category dis_flex " @click="commoditysettingView">
            <div class="dis_flex">
                <img src="img/commodity.png">
                <span>商品管理</span>
            </div>
            <div class="dis_flex">
                <img src="img/return_5.png">
            </div>
        </div>
        <div v-if="user.jurisdiction==1||user.jurisdiction==3" class="category dis_flex " @click="commoditySaleView">
            <div class="dis_flex">
                <img src="img/Sale.png">
                <span>商品销售详情</span>
            </div>
            <div class="dis_flex">
                <img src="img/return_5.png">
            </div>
        </div>
        <div v-if="user.jurisdiction==1||user.jurisdiction==3" class="category dis_flex " @click="orderManagerView">
            <div class="dis_flex">
                <img src="img/Order.png">
                <span>订单管理</span>
            </div>
            <div class="dis_flex">
                <img src="img/return_5.png">
            </div>
        </div>
        <div v-if="user.jurisdiction==1||user.jurisdiction==3" class="category dis_flex "
             @click="putForwardManagerView">
            <div class="dis_flex">
                <img src="img/Finance.png">
                <span>财务管理</span>
            </div>
            <div class="dis_flex">
                <img src="img/return_5.png">
            </div>
        </div>
        <div v-if="user.jurisdiction==1||user.jurisdiction==4" class="category dis_flex " @click="salesmanView">
            <div class="dis_flex">
                <img src="img/business.png">
                <span>业务员管理</span>
            </div>
            <div class="dis_flex">
                <img src="img/return_5.png">
            </div>
        </div>
        <div v-if="user.jurisdiction==1||user.jurisdiction==2" class="category dis_flex " @click="areaManagerView">
            <div class="dis_flex">
                <img src="img/region.png">
                <span>区域管理</span>
            </div>
            <div class="dis_flex">
                <img src="img/return_5.png">
            </div>
        </div>
        <div v-if="user.jurisdiction==1" class="category dis_flex " @click="superAreaManagerView">
            <div class="dis_flex">
                <img src="img/region.png">
                <span>总区域管理</span>
            </div>
            <div class="dis_flex">
                <img src="img/return_5.png">
            </div>
        </div>
    </div>
    <footer>
        <div>
            <a href="javascript:" @click="logout">退出登录</a>
        </div>
    </footer>
</div>
</body>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>//jurisdiction
let vm = new Vue({
    el: '#vueData',
    data: {
        user: JSON.parse(localStorage.localStore)
    },
    methods: {
        gotoStoreHomeView() {
            location.href = "shopinformation.html";
        }, commoditysettingView() {
            location.href = "Commoditysetting.html";
        }, commoditySaleView() {
            location.href = "commoditySale.html";
        }, orderManagerView() {
            location.href = "orderList.html";
        }, putForwardManagerView() {
            if (vm.user.jurisdiction == 1) {
                location.href = "applicationCash.html";
            } else {
                location.href = "putForward.html";
            }
        }, logout() {
            localStorage.removeItem("localStore");
            location.href = 'login.html';
        }, salesmanView() {
            location.href = 'Salesman.html';
        }, areaManagerView() {
            location.href = 'management.html';
        }, superAreaManagerView() {
            location.href = 'regionManagement.html';
        }
    }
});
$(function () {
    if (!localStorage.localStore) {
        location.href = 'login.html'
    }
});
</script>
</html>